package com.it.springbootmybatis.query;

/**
 * @projectName: springboot-practice
 * @package: com.it.springbootmybatis.query
 * @className: CompanyQuery
 * @author: Navid
 * @description: TODO
 * @date: 2021/10/23 12:17
 * @version: 1.0
 */
public class CompanyQuery {
    private String name;
    private String addr;
    private String personCharged;
    private int currentPage = 1;
    private int pageSize = 5;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAddr() {
        return addr;
    }

    public void setAddr(String addr) {
        this.addr = addr;
    }

    public String getPersonCharged() {
        return personCharged;
    }

    public void setPersonCharged(String personCharged) {
        this.personCharged = personCharged;
    }

    //根据参数分页,每页开始的下标
    public Integer getBeginIndex() {
        return (currentPage - 1) * pageSize;
    }

    public int getCurrentPage() {
        return currentPage;
    }

    public void setCurrentPage(int currentPage) {
        this.currentPage = currentPage;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }
}
